package br.com.solutions.delivery.entity.abst;

import java.io.Serializable;
import java.util.Objects;

public abstract class AbstractEntity implements Serializable{
    
    private String id;
    
    public String getId(){
        return this.id;
    }
    
    public void setId(String id){
        this.id = id;
    }
    
    @Override
    public boolean equals(Object object){
        if (object instanceof AbstractEntity){
            return this.id.equals(((AbstractEntity) object).getId());
        }
        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(this.id);
    }
}
